package entities;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the AdminUser database table.
 * 
 */
@Entity
public class AdminUser implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private AdminUserPK id;

    @Temporal( TemporalType.DATE)
	private Date date;

	//bi-directional many-to-one association to Adminstrator
    @ManyToOne
	@JoinColumn(name="Adminstrator_admin",  insertable=false, updatable=false)
	private Adminstrator adminstrator;

	//bi-directional many-to-one association to User
    @ManyToOne
	@JoinColumn(name="User_user" , insertable=false, updatable=false)
	private User user;

    public AdminUser() {
    }

	public AdminUserPK getId() {
		return this.id;
	}

	public void setId(AdminUserPK id) {
		this.id = id;
	}
	
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Adminstrator getAdminstrator() {
		return this.adminstrator;
	}

	public void setAdminstrator(Adminstrator adminstrator) {
		this.adminstrator = adminstrator;
	}
	
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
}